var li =document.getElementsByClassName('xuanxiangka')[0].children;

var div=document.getElementsByClassName('tupian')[0].children;

for(var a=0;a<li.length;a++){
    li[a].setAttribute('id',a);
    li[a].onmouseover=function () {
        for(var p=0;p<li.length;p++){
            div[p].className='';
            div[this.getAttribute('id')].className='bian';
        }
    }
}


var swiper = new Swiper('.swiper-container', {
    pagination: {
        el: '.swiper-pagination',
    },
});

var swiper = new Swiper('.swiper-container', {
    spaceBetween: 30,
    centeredSlides: true,
    autoplay: {
        delay: 2500,
        disableOnInteraction: false
    },
    pagination: {
        el: '.swiper-pagination',
        clickable: true
    },
    navigation: {
        nextEl: '.swiper-button-next',
        prevEl: '.swiper-button-prev'
    }
});

var vm = new Vue({
    el:'#app',
    data:{
        message:'数据连接中...'
    },
    mounted(){
        axios
            .get('news.json')
            .then(response => (this.message = response.data.url/*这里是json的数据的名字*/))
    .catch(function (error){
            console.log(error);
        });
    }
});

